#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
MUD客户端主入口文件
"""

import asyncio
import logging
from mud_client.client import MUDClient
from mud_client.utils.ui_logging import UILoggingHandler

# 配置根日志记录器
logging.basicConfig(
    level=logging.DEBUG,
    format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
    handlers=[
        UILoggingHandler(),
        logging.FileHandler('mud_client.log', encoding='utf-8')
    ],
)


async def main():
    """
    异步主函数
    """
    client = MUDClient()
    await client.run()

if __name__ == "__main__":
    asyncio.run(main())